HipFont

Undocumented in source.

Constructors

this
this()
Undocumented in source.

Members

Functions

calculateTextBounds
void calculateTextBounds(string text, uint[] linesWidths, int biggestWidth, int height, int maxWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
characters
HipFontChar[dchar] characters()

////Properties///////

characters
const(HipFontChar[dchar]) characters()
Undocumented in source. Be warned that the author may not have intended to support it.
getFontWithSize
HipFont getFontWithSize(uint size)
Undocumented in source.
getHeight
uint getHeight()
Undocumented in source.
getKerning
int getKerning(dchar current, dchar next)
Undocumented in source.
getKerning
int getKerning(const(HipFontChar)* current, const(HipFontChar)* next)
Undocumented in source.
isReady
bool isReady()
Undocumented in source. Be warned that the author may not have intended to support it.
lineBreakHeight
uint lineBreakHeight()
Undocumented in source. Be warned that the author may not have intended to support it.
lineBreakHeight
uint lineBreakHeight(uint newHeight)
Undocumented in source. Be warned that the author may not have intended to support it.
onDispose
void onDispose()
Undocumented in source. Be warned that the author may not have intended to support it.
onFinishLoading
void onFinishLoading()
Undocumented in source. Be warned that the author may not have intended to support it.
spaceWidth
uint spaceWidth()
Undocumented in source. Be warned that the author may not have intended to support it.
spaceWidth
uint spaceWidth(uint newWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
texture
inout(IHipTexture) texture()
Undocumented in source. Be warned that the author may not have intended to support it.
wordWrapRange
HipWordWrapRange wordWrapRange(string text, int maxWidth)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_characters
HipFontChar[dchar] _characters;
Undocumented in source.
_lineBreakHeight
uint _lineBreakHeight;

How much the line break will offset in Y the next char

_spaceWidth
uint _spaceWidth;

Saves the space width for the bitmap text process the ' '. If the original spaceWidth is == 0, it won't draw a quad

_texture
IHipTexture _texture;

Underlying GPU texture

Inherited Members

From HipAsset

_name
string _name;

Use it to insert into an asset pool, alias

_assetID
uint _assetID;

Currently not in use

_typeID
uint _typeID;

Usage inside asset manager

loadTime
float loadTime;

How much time it took to load, in millis

name
string name()
Undocumented in source. Be warned that the author may not have intended to support it.
name
string name(string newName)
Undocumented in source. Be warned that the author may not have intended to support it.
assetID
uint assetID()
Undocumented in source. Be warned that the author may not have intended to support it.
typeID
uint typeID()
Undocumented in source. Be warned that the author may not have intended to support it.
onFinishLoading
void onFinishLoading()

Action for when the asset finishes loading Proabably be executed on the main thread

isReady
bool isReady()
Undocumented in source.
onDispose
void onDispose()

Use it to clear the engine.

startLoading
void startLoading()
Undocumented in source. Be warned that the author may not have intended to support it.
finishLoading
void finishLoading()
Undocumented in source. Be warned that the author may not have intended to support it.
dispose
void dispose()

Currently, no AssetID recycle is in mind. It will only invalidate the asset for disposing it on an appropriate time

From IHipFont

getKerning
int getKerning(const(HipFontChar)* current, const(HipFontChar)* next)
Undocumented in source.
getKerning
int getKerning(dchar current, dchar next)
Undocumented in source.
getHeight
uint getHeight()
Undocumented in source.
calculateTextBounds
void calculateTextBounds(string text, uint[] linesWidths, int biggestWidth, int height, int maxWidth)
getTextHeight
uint getTextHeight(string text)
wordWrapRange
HipWordWrapRange wordWrapRange(string text, int maxWidth)
Undocumented in source.
characters
HipFontChar[dchar] characters()
Undocumented in source.
texture
inout(IHipTexture) texture()
Undocumented in source.
spaceWidth
uint spaceWidth()
Undocumented in source.
spaceWidth
uint spaceWidth(uint newWidth)
Undocumented in source.
lineBreakHeight
uint lineBreakHeight()

Used for reference as height for text

lineBreakHeight
uint lineBreakHeight(uint newHeight)
Undocumented in source.

Meta